-- GENERATED SPELL FOR [Captain Blackanvil] --


function spell0_15440(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15440', 5270, 1)
end

function spell1_15440(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(15548,pUnit)
pUnit:RegisterEvent('Sorts_15440', 10330, 1)
end

function Sorts_15440(pUnit, Event)
local choix_sorts_15440 = math.random(0, 1)
if choix_sorts_15440 == 0 then
pUnit:RegisterEvent('spell0_15440', 1, 1)
end
if choix_sorts_15440 == 1 then
pUnit:RegisterEvent('spell1_15440', 1, 1)
end
end

function mob15440_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15440', math.random(1500, 3000), 1)
end

function mob15440_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15440_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15440_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15440, 1, 'mob15440_Action')
RegisterUnitEvent(15440, 2, 'mob15440_Leave')
RegisterUnitEvent(15440, 3, 'mob15440_Kill')
RegisterUnitEvent(15440, 4, 'mob15440_Die')
